<!-- 首页 -->
<template>
	<view class="component">
		<u-popup :show="popupShow" round="40rpx" mode="bottom" @close="handleClose" closeOnClickOverlay style="z-index: 9999;">
			<view class="popup">
				<view class="flex justify-between align-center">
					<view class="">
						<text class="f-s17 f-w500">{{title}}</text>
					</view>
					<image src="/static/images/login/close.png" class="width-24" mode="widthFix" @click="handleClose"></image>
				</view>
				<slot></slot>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		name:"",
		props:{
			title:{
				default:''
			},
			show:{
				type:Boolean,
				default:false
			}
		},
		data() {
			return {
				popupShow:false
			}
		},
		watch:{
			show:{
				immediate:true,
				deep:true,
				handler(val){
					this.popupShow = val
				}
			}
		},
		methods: {
			handleClose(){
				this.popupShow = false
				this.$emit('update:show',false)
			}
		}
	}
</script>

<style scoped lang="scss">
	.component{
		.popup{
			padding: 32rpx;
		}
	}
	

</style>
